using Net35.Xrm.Sdk;
using System;
using System.Runtime.Serialization;
namespace Net35.Crm.Sdk.Messages
{
	[DataContract(Namespace = "http://schemas.microsoft.com/crm/2011/Contracts")]
	public sealed class AuditDetailCollection : IExtensibleDataObject
	{
		private ExtensionDataObject _extensionDataObject;
		private DataCollection<AuditDetail> _auditDetails;
		public AuditDetail this[int index]
		{
			get
			{
				return this._auditDetails[index];
			}
			set
			{
				this._auditDetails[index] = value;
			}
		}
		[DataMember]
		public DataCollection<AuditDetail> AuditDetails
		{
			get
			{
				if (this._auditDetails == null)
				{
					this._auditDetails = new DataCollection<AuditDetail>();
				}
				return this._auditDetails;
			}
			private set
			{
				this._auditDetails = value;
			}
		}
		public int Count
		{
			get
			{
				return this._auditDetails.Count;
			}
		}
		[DataMember]
		public bool MoreRecords
		{
			get;
			set;
		}
		[DataMember]
		public string PagingCookie
		{
			get;
			set;
		}
		[DataMember]
		public int TotalRecordCount
		{
			get;
			set;
		}
		public ExtensionDataObject ExtensionData
		{
			get
			{
				return this._extensionDataObject;
			}
			set
			{
				this._extensionDataObject = value;
			}
		}
		public AuditDetailCollection()
		{
			this._auditDetails = new DataCollection<AuditDetail>();
		}
		public void Add(AuditDetail auditDetail)
		{
			this._auditDetails.Add(auditDetail);
		}
	}
}
